//
//  ColorTableViewController.m
//  AppSettings
//
//  Created by student on 16/3/16.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ColorTableViewController.h"

@interface ColorTableViewController ()
@property (weak, nonatomic) IBOutlet UISlider *redSlider;
@property (weak, nonatomic) IBOutlet UISlider *greenSlider;
@property (weak, nonatomic) IBOutlet UISlider *blueSlider;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation ColorTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)colorChanged:(id)sender
{
    int valueRed = self.redSlider.value;
    int valueGreen = self.greenSlider.value;
    int valueBlue = self.blueSlider.value;
    self.imageView.backgroundColor = [UIColor colorWithRed:valueRed/225.0 green:valueGreen/255.0 blue:valueBlue/255.0 alpha:1];

}
- (IBAction)backBtnPressed:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - Table view data source




@end
